package com.me.test.config;

import com.me.test.mybatis.MybatisInterceptor111;
import com.me.test.mybatis.MybatisInterceptor222;
import org.apache.ibatis.plugin.Interceptor;
import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 直接声明 mybatis 插件 bean，mybatis 自动配置会设置进去，见 {@link MybatisAutoConfiguration#MybatisAutoConfiguration MybatisAutoConfiguration()}
 * mybatis插件 先配置，后执行
 *
 * @author ME
 */
@Configuration
public class MybatisConfig {

    @Bean
    public Interceptor mybatisPlugin222() {
        return new MybatisInterceptor222();
    }

    @Bean
    public Interceptor mybatisPlugin111222() {
        return new MybatisInterceptor111();
    }

    @Bean
    public Interceptor mybatisPlugin111() {
        return new MybatisInterceptor111();
    }

}
